<html>
<head>
    <title>Pollos Hermanos</title>
	<link href="elemento(2).css" type="text/css" rel="stylesheet">
</head>    
<body>
	<div id="cabecera">
    <h1>POLLOS HERMANOS</h1>
	<img id="logoarr" width='10%' height='10%' src='pollos.jpg'>
	</div>
	<div id="fecha">
	<b>
	<script type="text/javascript">
	function startTime(){
	today=new Date();
	h=today.getHours();
	m=today.getMinutes();
	s=today.getSeconds();
	m=checkTime(m);
	s=checkTime(s);
	document.getElementById('reloj').innerHTML=h+":"+m+":"+s;
	t=setTimeout('startTime()',500);}
	function checkTime(i)
	{if (i<10) {i="0" + i;}return i;}
	window.onload=function(){startTime();}
	</script>

<div id="reloj" style="font-size:20px;"></div>
	</b> 
	</div>


    
     <div id="menu">
    	<ul>
		<b>
        	<li><a href='cpollos.php'>Inicio</a></li>
            <li><a href='carrito.php'>Producto</a></li>
            <li>Carrito</li> 
		</b>
        </ul>
		</div>
    <div id="menu2">
        <h4>Indice</h4>
        <div >
         
            
            <li class="b"><a href='carrito.php'>Producto</a></li>
			<li class="b">Carrito</li>
        </div>
    </div>
    <div id="centroprincipal">
    <?php
	  
$link = mysql_connect('localhost', "root")or die('No se pudo conectar: ' . mysql_error());
mysql_select_db('proyecto') or die('No se pudo seleccionar la base de datos');


$query = 'SELECT * FROM producto';
$result = mysql_query($query) or die('Consulta fallida: ' . mysql_error());


echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
    echo "<tr>";
    foreach ($line as $col_value) {
        echo "<td>$col_value</td>";
    }
	echo "</tr>";
}
echo "</table>\n";
mysql_free_result($result);

mysql_close($link);
	
	?>
    </div>   
        
    
    <div id="pie">
      <p><b>Producto registrado por la empresa pollos hermanos.</b></p>
	  <p>
	  <script type="text/javascript">
	//<![CDATA[
	var date = new Date();
	var d  = date.getDate();
	var day = (d < 10) ? '0' + d : d;
	var m = date.getMonth() + 1;
	var month = (m < 10) ? '0' + m : m;
	var yy = date.getYear();
	var year = (yy < 1000) ? yy + 1900 : yy;
	document.write(day + "/" + month + "/" + year);
//]]>
</script>
	  </p>
    </div>
</body>
</html>